<script>
export default {
  name: "MainPageCard2",
  props:{
    img:{
      required:true,
      type:String,
    },
    character:{
      required:true,
      type:String,
    },
    bColor:{
      required:true,
      type:String,
    },
  },
  data(){
    return{

    }
  }
}
</script>

<template>
  <div class="card-container" :style="{backgroundColor: bColor}">
    <img :src="img" alt="null">
    <div>
      <ul>
        <li v-for="char in character" :key="char">{{char}}</li>
      </ul>
    </div>
  </div>
</template>

<style scoped>
.card-container{
  width: 120px;
  height: 90px;
  position: relative;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
  border-radius: 6px;
}
.card-container img{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90%;
  transform: translate(-50%,-85%);
  animation: moveAni 3s infinite linear;
  animation-delay: 2s;
}
@keyframes moveAni {
  0%{
    transform: translate(-50%,-85%);
  }
  50%{
    transform: translate(-50%,-90%);
  }
  100%{
    transform: translate(-50%,-85%);
  }

}
.card-container ul{
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 50%;
  display: flex;
  left: 0;
  justify-content: center;
  align-items: center;
}

.card-container li{
  text-align: center;
  font-size: 1em;
  list-style: none;
  font-weight: bolder;
  margin: 2px;
  color: white;
}

</style>